import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
    {
        path: "/login",
        name: "Login",
        meta: {name: '登录页面'},
        component: () => import('../views/login.vue')
    },
    {
        path: '/',
        name: 'home',
        component: () => import(/* webpackChunkName: "about" */ '../views/HomeView.vue'),
        redirect: '/homePage',
        children: [
            {
                path: '/homePage',
                name: 'homePage',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/HomePage.vue')
            },
            {
                path: '/first',
                name: 'first',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/FirstTypeNovel.vue')
            },
            {
                path: '/second',
                name: 'second',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/SecondTypeNovel.vue')
            },
            {
                path: '/third',
                name: 'third',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/ThirdTypeNovel.vue')
            }, {
                path: '/fourth',
                name: 'fourth',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/FourthTypeNovel.vue')
            }, {
                path: '/wangyou',
                name: 'wangyou',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/WangyouTypeNovel.vue')
            }, {
                path: '/scienceFiction',
                name: 'scienceFiction',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/ScienceFictionTypeNovel.vue')
            }, {
                path: '/sou',
                name: 'sou',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/SouTypeNovel.vue')
            }, {
                path: '/details',
                name: 'details',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/details.vue')
            }, {
                path: '/neirong',
                name: 'neirong',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/Nerong.vue')
            },
            {
                path: '/houtai',
                name: 'houtai',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/Houtai.vue')
            },
            {
                path: '/shujia',
                name: 'shujia',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/ShujiaTypeNovel.vue')
            },
            {
                path: '/user',
                name: 'user',
                component: () => import(/* webpackChunkName: "about" */ '../views/manager/user.vue')
            }
        ]
    }
]

const router = new VueRouter({
    mode: 'history',
    base: process.env.BASE_URL,
    routes
})

export default router
